package org.komarichin.beans.dao;

import org.komarichin.beans.IRole;

import java.io.Serializable;
import java.util.Collection;

/**
 * User: Michael Komarichin
 * Date: 05.10.2009
 * Time: 10:42:08
 */
public interface IRoleDAO extends Serializable {
    IRole save(IRole role);

    void remove(IRole role);

    void update(IRole role);

    IRole getRoleByName(String name);

    IRole getRoleById(Long id);

    Collection<IRole> getAll();

    IRole newInstanceRole(Long id, String name, Long permission);

    Collection<? extends IRole> getAllowRoles(Long permission);
}
